import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'

export default defineConfig({
  plugins: [vue()],
  base: './',//打包后在文件夹中访问地址
  server: {
    //用来配置跨域
    port: 8000,
    proxy: {
      '/api': {
        target: 'https://demo.linwute.com', //目标服务器地址
        changeOrigin: true,
        rewrite: (path) => path.replace(/^\/api/, '')
      },
    }
  },

})
